﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using STT.Business;
using STT.Entities;
using System.Data;
using System.Text;

namespace STT.Admin.UserControls
{
    public partial class ucBangCap : System.Web.UI.UserControl
    {
        public bool chonSuaClick;
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadBangCap();
            
            chonSuaClick = false;
        }
        void LoadBangCap()
        {
            gvBangCap.AutoGenerateColumns = false;
            gvBangCap.DataSource = BTbBangCap.SelectAll();
            gvBangCap.DataBind();
        }
        protected void btThemMoi_Click(object sender, EventArgs e)
        {
            BTbBangCap.Insert(new ETbBangCap
            {
                MaBangCap = int.Parse(txtMaBangCap.Text),
                TenBangCap = txtTenBangCap.Text,
                TrangThai = Convert.ToBoolean(ddTrangThai.SelectedValue)
            });
            LoadBangCap();
        }

        protected void gvBangCap_RowCommand(object sender, GridViewCommandEventArgs e)
        {

        }

        protected void btSearch_Click(object sender, ImageClickEventArgs e)
        {

        }

        protected void lbXoaTat_Click(object sender, EventArgs e)
        {

        }

        protected void btThemExcel_Click(object sender, EventArgs e)
        {

        }

        protected void lbXuatDuLieu_Click(object sender, EventArgs e)
        {

        }
    }
}